//id check----------------------------------
function uploadImage()
{

	var url="./fileupload/uploadFileForm.jsp";
	window.open(url, '','width=300, height=170');
}

//Check Form-------------------------------------------------
function checkForm()
{
	var form = document.frm;
	
	//item name
	if(form.name.value=="" || form.name.value==null)
	{
		alert("Input item name");
		form.name.focus();
		return false;
	}
	//item description
	if(form.description.value=="" || form.description.value==null)
	{
		alert("Input item description");
		form.description.focus();
		return false;
	}	
	//starting price
	if(!(form.startingprice.value=="" || form.startingprice == null)) 
	{
		if (isNaN(form.startingprice.value)) {
			alert("Input only digit for starting price");
			form.startingprice.focus();
			return false;		
		}	
	}	
	//reserve price
	if(!(form.reserveprice.value=="" || form.reserveprice == null)) 
	{
		if (isNaN(form.reserveprice.value)) {
			alert("Input only digit for reserve price");
			form.reserveprice.focus();
			return false;		
		}	
	}	
	//buy out price
	if(!(form.buyoutprice.value=="" || form.buyoutprice == null)) 
	{
		if (isNaN(form.buyoutprice.value)) {
			alert("Input only digit for buyout price");
			form.buyoutprice.focus();
			return false;		
		}	
	}		
	//input date
	if(form.date.value=="" || form.date.value==null ) 
	{
		alert("Input date");
		form.date.focus();
		return false;
	}
	else if(form.time.value=="" || form.time.value==null ) 
	{
		alert("Input time");
		form.passwd.focus();
		return false;
	}
	else { 
		form.submit();
	}
}